#设置sdf文件数据前缀
import numpy as np
from scipy.constants import *
#=========单位、数量级===============================================
femto = 1e-15
micron = 1e-6
pi = np.pi
#==========常用物理量=================================================
qe = e
me = m_e
epsilon0 = epsilon_0
h_bar = hbar
#==========模拟参数===================================================
sdf_dim = 1
#------laser------------
laser_wavelength = 1e-6
laser_frequency = 2 * np.pi * c / laser_wavelength
laser_k = 2 * np.pi / laser_wavelength
laser_wavenumber = 1 / laser_wavelength
laser_T = laser_wavelength / c
laser_a = 3162
laser_E = laser_a * me * laser_frequency * c / qe
#-----grid--------------
nx = 1000
ny = 200
xmin = 0
xmax = 10 * laser_wavelength
ymin = 0
ymax = 2 * laser_wavelength
#=============统计区间，参数========================================
sdf_prefix = 'f'
#设置第一个要作图的sdf数据范围,以列表表示
sdf_scope = [1]
tempx = int((1e-12 - 200e-15) * c / (xmax - xmin) * nx)  #选择x方向需要统计的起始点,微米为单位
tempy = int(1e-12 * c / (xmax - xmin) * nx)  #选择x方向需要统计的起始点
x = -int(0.05 * (tempy - tempx)) + tempx
y = int(0.05 * (tempy - tempx)) + tempy
# x =  3770 - 100 - 325
# y =  3770 + 100
yx = int(0)  #选择y方向需要统计的起始点
yy = int(2400)  #选择y方向需要统计的起始点
xslice = slice(x, y)
yslice = slice(yx, yy)